package com.atguigu.serviceedu.controller;

import com.atguigu.commonutils.R;
import com.atguigu.serviceedu.client.OrdersClient;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: GengKY
 * @Date: 2021/11/9 14:18
 */

@Api(description="测试API")
@RestController
@RequestMapping("/eduService/test")
public class TestController {

    @Autowired
    OrdersClient ordersClient;


    @GetMapping("/getAllOrderinfo")
    public R getAllOrderInfoTest(){
        R allOrderInfo = ordersClient.getAllOrderInfo();
        return allOrderInfo;
    }

    @GetMapping("/getorderinfo/{orderid}")
    public R getOrderByIdTest(@PathVariable String orderid){
        R orderInfo = ordersClient.getOrderInfo(orderid);
        return orderInfo;
    }



}
